package com.lmy.springboot.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * RestController 标识的类就是一个控制器
 * 且在扫描路径下，所以会被注入到spring容器中
 */
//@Controller
//@ResponseBody
@RestController
public class HiController {

    @RequestMapping("/hi")
    public String hi() {
        return "hi lmy HiController";
    }
}
